﻿<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <title>商品收藏</title>
    <th:block th:insert="~{front/include::head}"></th:block>
</head>

<body>
<header th:replace="~{front/include::header}"></header>

<main class="main">
    <div class="page-header breadcrumb-wrap">
        <div class="container">
            <div class="breadcrumb">
                <a th:href="@{/vm/front/index}" rel="nofollow">主页</a>
                <span></span> 购物
                <span></span> 商品收藏
            </div>
        </div>
    </div>
    <section class="mt-50 mb-50">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="table-responsive">
                        <table class="table shopping-summery text-center">
                            <thead>
                            <tr class="main-heading">
                                <th scope="col" colspan="2">产品</th>
                                <th scope="col">价格</th>
                                <th scope="col">库存状态</th>
                                <th scope="col">操作</th>
                                <th scope="col">移除</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="wi:${wis}" th:data-wid="${wi.id}" >
                                <td class="image product-thumbnail"><img th:src="@{/assets/{url}(url=${wi.goods.pic})}" alt="#">
                                </td>
                                <td class="product-des product-name">
                                    <h5 class="product-name">
                                        <a th:href="@{/vm/goods/detail(goodsId=${wi.goodsId})}" th:text="${wi.goods.name}"></a>
                                    </h5>
                                    <p class="font-xs" th:text="${wi.goods.summary==null?'暂无':wi.goods.summary}"></p>
                                </td>
                                <td class="price" data-title="Price" >
                                    <span th:text="'$'+${wi.goods.price}">$65.00 </span>
                                </td>
                                <td class="text-center" data-title="Stock">
                                    <span th:if="${wi.goods.qty>0}" th:text="'库存'+${wi.goods.qty}+'件'"
                                          class="color3 font-weight-bold">有货</span>
                                    <span th:if="${wi.goods.qty==0||wi.goods.qty==null}"
                                          class="text-danger font-weight-bold">缺货</span>
                                </td>
                                <td class="text-right" data-title="Cart">
                                    <button class="btn btn-sm add-to-cart"
                                            th:if="${wi.goods.qty>0}" th:data-goods-id="${wi.goodsId}">
                                        <i class="fi-rs-shopping-bag mr-5"></i>添加到购物车
                                    </button>
                                    <button th:if="${wi.goods.qty==0||wi.goods.qty==null}"
                                            class="btn  btn-sm btn-secondary">
                                        <i class="fi-rs-headset mr-5"></i>缺货中
                                    </button>
                                </td>
                                <td class="action" data-title="remove">
                                    <a href="#"><i class="fi-rs-trash"></i></a>
                                </td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
</main>
<footer th:replace="~{front/include::footer}"></footer>
<div th:insert="~{front/include::loader}"></div>
<div th:insert="~{front/include::scripts}"></div>
<script th:src="@{/assets/front/js/shop/wishlist.js}"></script>
</body>

</html>